Skip to content

Add fail safe for non-existing statistics & maintenance option#3365

Merged
ildyria merged 5 commits intomasterfrom
failsafe-statistics
May 25, 2025
Merged

Add fail safe for non-existing statistics & maintenance option#3365
ildyria merged 5 commits intomasterfrom
failsafe-statistics

Conversation

@ildyria
Copy link
Copy Markdown
Member

@ildyria ildyria commented May 20, 2025

This pull request introduces functionality to check and fix missing statistics for photos and albums, along with related updates to resources and translations. The most important changes include adding a new diagnostic check for statistics integrity, implementing a maintenance controller for fixing missing statistics, and updating translations for multiple languages to support this feature.

New Functionality for Statistics Integrity:

  • Added StatisticsIntegrityCheck class: Implements a diagnostic pipe to identify albums and photos without associated statistics and provides warnings for missing statistics. (app/Actions/Diagnostics/Pipes/Checks/StatisticsIntegrityCheck.php)
  • Created StatisticsCheck controller: Provides endpoints to check and generate missing statistics for albums and photos. (app/Http/Controllers/Admin/Maintenance/StatisticsCheck.php)

Resource Updates:

  • Added StatisticsCheckResource: A new resource class to encapsulate the results of the statistics integrity check. (app/Http/Resources/Diagnostics/StatisticsCheckResource.php)
  • Modified PhotoStatisticsResource: Updated the fromModel method to handle null statistics gracefully. (app/Http/Resources/Models/PhotoStatisticsResource.php)

Translation Updates:

  • Added translations for statistics integrity check: Updated language files to include strings for the new feature in multiple languages, including English, German, French, Japanese, and others. (lang/{ar,cz,de,el,en,es,fr,hu,it,ja,nl,no,pl,pt,ru,sk}/maintenance.php) (e.g., [1] [2] [3]

@ildyria ildyria requested a review from a team as a code owner May 20, 2025 20:57
@ildyria ildyria added Review: easy Easy review expected: probably just need a quick to go through. High Priority High priority issues labels May 20, 2025
@codecov
Copy link
Copy Markdown

codecov Bot commented May 20, 2025

Codecov Report

Attention: Patch coverage is 85.71429% with 5 lines in your changes missing coverage. Please review.

Project coverage is 86.99%. Comparing base (5216781) to head (aff5897).
Report is 2 commits behind head on master.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ildyria ildyria added the alpha-ready Branch is available in alpha label May 21, 2025
@ildyria ildyria merged commit 62018e9 into master May 25, 2025
35 checks passed
@ildyria ildyria deleted the failsafe-statistics branch May 25, 2025 00:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

alpha-ready Branch is available in alpha High Priority High priority issues Review: easy Easy review expected: probably just need a quick to go through.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants